package com.dragon.web.ykd.controller;

import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.fintech.third.service.youdun.YdService;
import com.marvels.common.utils.MarvelsLogUtil;

@Controller
@RequestMapping(value = "${platform.name.code}/moxie")
public class MoXieController {
	
	@Autowired
	private YdService ydService;
	
	@ResponseBody
	@RequestMapping(value = "call/report")
	public void saveLinkmans(@RequestBody Map<String, String> params, HttpServletResponse resp) {
		MarvelsLogUtil.getInstance().info("魔蝎运营商回调报告参数：" + JSONObject.toJSONString(params));
		resp.setStatus(201);
	}
	
	
	/**
	 * 临时开放的
	 * @param params
	 * @param resp
	 */
	@ResponseBody
	@RequestMapping(value = "call/runGetData")
	public void runGetData() {
		ydService.runGetData();
	}
}
